<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>方案详情</title>
<meta name="author" content="BIZ Team" />
<meta name="copyright" content="BIZ" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<link href="${base}/resources/admin/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; 方案详情
	</div>
	<form id="inputForm" action="detail.jhtml" method="get">
		<ul id="tab" class="tab">
			<li>
				<input type="button" value="基本信息" />
			</li>
			<li>
				<input type="button" value="方案描述" />
			</li>
			<li>
				<input type="button" value="方案配置参数" />
			</li>
			<li>
				<input type="button" value="设备配置表" />
			</li>
			<li>
				<input type="button" value="方案辅材" />
			</li>
			<li>
				<input type="button" value="方案图片" />
			</li>
		</ul>
		<input type="hidden" id="hiddenAttrs" value="${scheme.attribute}"/>
		<table class="input tabContent">
			<tr>
				<th>
					类型:
				</th>
				<td>
					<span>
						[#list dValues as dv]
							[#if dv.id == scheme.type]
								${dv.title}
							[/#if]
						[/#list]
					</span>
				</td>
			</tr>
			<tr>
				<th>
					方案名称:
				</th>
				<td>
					<span>${scheme.name}</span>
				</td>
			</tr>
			<tr>
				<th>
					主材产品:
				</th>
				<td>
					<!--方案主材产品位置-->
					<table class="input" id="schemeProductTable">
						[#if scheme.schemeProducts.size() > 0]
							<tr>
								<td>主材名称</td>
								<td>主材品牌</td>
								<td>主材分类</td>
								<td>主材价格</td>
							</tr>
							[#list scheme.schemeProducts as schemeP]
								<tr>
									<td>${schemeP.name}</td>
									<td>${schemeP.brand.name}</td>
									<td>${schemeP.category.title}</td>
									<td>${schemeP.price?string("0.00")}</td>
								</tr>
							[/#list]
						[/#if]
					</table>
				</td>
			</tr>
			<tr>
				<th>
					方案属性:
				</th>
				<td id="schemeattrTd">
					[#list schAttrs as schattr]
						<label><input type="checkbox" name="schemeAttr" disabled="true" value="${schattr.id}" />${schattr.title}</label>
					[/#list]
				</td>
			</tr>
			<tr>
				<th>
					面积范围:
				</th>
				<td>
					[#list areaTags as at]
						<label><input type="radio" name="areaTag" value="${at.id}" [#if scheme.areaTag == at.id]checked="checked"[/#if] disabled="true"/>${at.title}</label>
					[/#list]
				</td>
			</tr>
			<tr>
				<th>
					适用面积:
				</th>
				<td>
					<span>${scheme.beginArea}㎡&nbsp;至&nbsp;${scheme.endArea}㎡</span>
				</td>
			</tr>
			<tr>
				<th>
					辅材单价(￥/㎡):
				</th>
				<td>
					<span>${scheme.auxiliaryUnitPrice}</span>
				</td>
			</tr>
			<tr>
				<th>
					安装费(￥/㎡):
				</th>
				<td>
					<span>${scheme.installCost}</span>
				</td>
			</tr>
			<tr>
				<th>
					面积(㎡):
				</th>
				<td>
					<span>${scheme.acreage}</span>
				</td>
			</tr>
			<tr>
				<th>
					展示图片:
				</th>
				<td>
					<span class="fieldSet">
						<input type="text" name="image" value="${scheme.image}" class="text" readonly="true" maxlength="200" title="用于首页方案的图片展示" />
					</span>
					<span>
						[#if scheme.image != null]
							<a href="${scheme.image}" target="_blank">[查看图片]</a>
						[/#if]
					</span>
				</td>
			</tr>
			<tr>
				<th>
					上架时间:
				</th>
				<td>
					<span>${scheme.upDate}</span>
				</td>
			</tr>
			<tr>
				<th>
					下架时间:
				</th>
				<td>
					<span>${scheme.downDate}</span>
				</td>
			</tr>
			<tr>
				<th>
					设置:
				</th>
				<td>
					<label>
						<input type="checkbox" name="isMarketable" disabled="true" [#if scheme.isMarketable]checked="checked"[/#if] />${message("Product.isMarketable")}
					</label>
					<label>
						<input type="checkbox" name="isList" disabled="true" [#if scheme.isList] checked="checked"[/#if] />${message("Product.isList")}
					</label>
					<label>
						<input type="checkbox" name="isTop" disabled="true" [#if scheme.isTop]checked="checked"[/#if]/>${message("Product.isTop")}
					</label>
					<label>
						<input type="checkbox" name="isChange" disabled="true" [#if scheme.isChange]checked="checked"[/#if]/>固定方案
					</label>
					<label>
						<input type="checkbox" name="isTehui" disabled="true" [#if scheme.isTehui]checked="checked"[/#if]/>特惠活动
					</label>
				</td>
			</tr>
			<tr>
				<th>
					搜索关键词:
				</th>
				<td>
					<span>${scheme.keyword}</span>
				</td>
			</tr>
			<tr>
				<th>
					页面标题:
				</th>
				<td>
					<span>${scheme.seoTitle}</span>
				</td>
			</tr>
			<tr>
				<th>
					价格说明:
				</th>
				<td>
					<span>${scheme.priceDescript}</span>
				</td>
			</tr>
		</table>
		<table class="input tabContent">
			<tr>
				<td>
					<span>${scheme.introduction}</span>
				</td>
			</tr>
		</table>
		<table id="productImageTable" class="input tabContent">
			<tr>
				<td>
					<span>${scheme.parameter}</span>
				</td>
			</tr>
		</table>
		<table class="input tabContent">
			<tr>
				<td>
					<span>${scheme.configuration}</span>
				</td>
			</tr>
		</table>
		<table class="input tabContent">
			<tr>
				<td>
					<span>${scheme.auxiliaryDescript}</span>
				</td>
			</tr>
		</table>
		<table class="input tabContent" id="productImageTable">
			<thead>
				<tr class="title">
					<td>文件</td>
					<td>标题</td>
					<td>排序</td>
				</tr>
			</thead>
			<tbody id="schemeProductImageBody">
				[#list scheme.schemeImages as schemeImage]
					<tr class='spImageTr'>
						<td>
							<input type="hidden" name="schemeImages[${schemeImage_index}].source" value="${schemeImage.source}" />
							<input type="hidden" name="schemeImages[${schemeImage_index}].large" value="${schemeImage.large}" />
							<input type="hidden" name="schemeImages[${schemeImage_index}].medium" value="${schemeImage.medium}" />
							<input type="hidden" name="schemeImages[${schemeImage_index}].thumbnail" value="${schemeImage.thumbnail}" />
							<input type="text" class="text" value="${schemeImage.large}" />
							<a href="${schemeImage.large}" target="_blank">[查看图片]</a>
						</td>
						<td>
							<input type="text" name="schemeImages[${schemeImage_index}].title" readonly="readonly" class="text" maxlength="200" value="${schemeImage.title}" />
						</td>
						<td>
							<span>${schemeImage.order}</span>
						</td>
					</tr>
				[/#list]
			</tbody>
		</table>
		<table class="input">
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="window.location.href='list.jhtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/customeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/scheme.js"></script>

<script type="text/javascript">
	$().ready(function() {
	
		//选中勾选的复选框标签
		var attrs = new Array();
		var attr = $("#hiddenAttrs").val();
		var attrBox = $("input[name='schemeAttr']");
		
		//选择被勾选的属性标签
		if(attr != null && attr != ""){
			attrs = attr.split(",");
			for(var i = 0;i<attrBox.length;i++){
				for(var j= 0 ;j<attrs.length;j++){
					if(attrs[j] == attrBox[i].value){
						attrBox[i].checked='checked';
						break;
					}
				}
			}
		}
	});	
</script>